import UIKit

class Toy {
	let name: String
	init(name: String) {
		self.name = name
	}
}
class Pet {
	var toy: Toy?
	
}
class Child {
	var pet: Pet?
	
}
let xiaoming = Child()
let toyName = xiaoming.pet?.toy?.name
